package files;

import java.io.File;
import java.io.IOException;

@SuppressWarnings("serial")
public class ListFile extends File {

	public ListFile(String pathname) {
		super(pathname);
	}
	
	public ListFile(File file) throws IOException {
		this(file.getCanonicalPath());
	}
	
	public ListFile(File file, String string) {
		super(file,string);
	}
	
	public String toString() {
		return getName();
	}
	
	public static ListFile[] files2ListFiles(File[] files) {
		try {
			ListFile[] tmp = new ListFile[files.length];
			for(int i = 0; i < files.length; i++) {
				tmp[i] = new ListFile(files[i]);
			}
			return tmp;
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

}
